<template>
	<view class="repair-wrap">
		<view class="tab_nav" style="background-color: #FFFFFF;">
			<view class="navTitle" v-for="(item,index) in navList" :key="index">
				<view :class="{'active':isActive === index}" @click="checked(index)">
					{{item.title}}
				</view>
			</view>
		</view>

		<!-- 装修详情 -->
		<view v-if="this.isActive==0">
			<view class="repair-box u-p-80 u-p-l-30 u-p-r-30">

				<view style="float: right; color: blue;font-size: 15px;font-weight: 900;margin-top: -40rpx;">

					<view style="margin-top: -20rpx;">
						<view
							style="color: #ffffff;background: #F9A832;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==1">待审批</view>

						<view
							style="color: #ffffff;background:#5599FF;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==2 ">
							业主审批
						</view>

						<view v-if="userObj.renovate_state ==9 ">

							<view v-if="userObj.currentRenovationStatus==2"
								style="color: #ffffff;background:#5599FF;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx">
								装修开始
							</view>
							<view v-if="userObj.currentRenovationStatus==1"
								style="color: #ffffff;background:#999;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx">
								装修未开始
							</view>

						</view>

						<view
							style="color: #ffffff;background:#999;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==20">申请取消</view>

						<view
							style="color: #ffffff;background:#AA0000;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==3 || userObj.renovate_state ==11">
							{{userObj.renovate_state ==3?"未通过":"申请未通过"}}
						</view>
						<view
							style="color: #ffffff;background: #55AA00;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==4">待退款</view>
						<view
							style="color: #ffffff;background:#CC6600;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==5">待验收</view>
						<view
							style="color: #ffffff;background:#0088A8;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==6">待确认</view>
						<view
							style="color: #ffffff;background:#999;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==7">已退款</view>

						<view
							style="color: #ffffff;background:green;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==8">待审核</view>
						<view
							style="color: #ffffff;background:#F9A832;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==10">待验收</view>
						<view
							style="color: #ffffff;background:#F9A832;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==13">
							{{userObj.approval_status==0?"退款待确认":"业主审批"}}
						</view>
						<view
							style="color: #ffffff;background:#F9A832;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==12">申请验收</view>


						<view
							style="color: #ffffff;background:#F9A832;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==16">待员工检验</view>

						<view
							style="color: #ffffff;background:#F9A832;padding: 10rpx 20rpx;text-align: center;border-bottom-right-radius:20rpx;border-top-left-radius:20rpx"
							v-if="userObj.renovate_state ==17">待财务计算</view>

					</view>
				</view>

				<view style="margin-top: 20rpx;">
					<h2 style="text-align: center;">

						{{ userObj.house_type==null || userObj.house_type==1  ?
							userObj.renovate_district + '-' + userObj.renovate_floor + 
							'-' + userObj.renovate_unit + '-' + userObj.renovate_house_number
							:userObj.house_type==2?userObj.pubilc_name:userObj.house_type==3?userObj.roomInfo:""}}的装修信息
					</h2>
				</view>


				<view v-if='userObj.house_type.house_type==null || userObj.house_type.house_type==1  '>
					<view class=" u-m-t-24">
						<span style="font-size: 15px;font-weight: 900;">房间信息：</span>
					</view>
					<view style="margin: 0 0rpx 0 30rpx;">
						<view style="margin-top: 10px;">
							<view style="color: #999">
								业主名称：
								<text style="font-weight: 700;color: #000;margin-left: 20rpx;">{{userObj.roomOwnerName}}</text>
							</view>
						</view>
						<view style="margin-top: 15px;">

							<view style="color: #999">
								业主电话：
								<text style="font-weight: 700;color: #000;margin-left: 20rpx;">{{userObj.roomOwnerTel}}</text>
							</view>

						</view>


						<view style="margin-top: 15px;">

							<view style="color: #999">
								房间类型：
								<text style="font-weight: 700;color: #000;margin-left: 20rpx;">{{userObj.roomTypeInfo}}</text>
							</view>

						</view>
						<view style="margin-top: 15px;">

							<view style="color: #999">
								房间面积：
								<text style="font-weight: 700;color: #000;margin-left: 20rpx;">{{userObj.roomArea}}㎡</text>
							</view>

						</view>
					</view>
				</view>

				<view v-if='userObj.house_type.house_type==1 || userObj.house_type.house_type==null'>
					<view class=" u-m-t-24">
						<span style="font-size: 15px;font-weight: 900;">装修信息：</span>

						<span style="color: blue;font-weight: 700;margin-left: 120px;"
							@click="imageBig(userObj.renovate_licence_image)">营业执照</span>
						<span style="float: right;color: blue;font-size: 15px;font-weight: 900;"
							@click="getPeoperList()">装修工人</span>

						<view style="margin: 0 0rpx 0 30rpx;">
							<view style="margin-top: 10px;">
								<view style="color: #999">
									装修周期：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.renovate_begin_time +
									'~' + userObj.renovate_last_time}}
									</text>
								</view>
							</view>

							<view style="margin-top: 15px;">
								<view style="color: #999">
									装修公司名称：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.renovate_outsource_org_name}}
									</text>
								</view>
							</view>

							<view style="margin-top: 15px;">
								<view style="color: #999">
									装修公司电话：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.renovate_outsource_org_tel}}
									</text>
								</view>
							</view>

							<view style="margin-top: 15px;">
								<view style="color: #999">
									装修地址：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.renovate_address}}
									</text>
								</view>
							</view>

							<view style="margin-top: 15px;">
								<view style="color: #999">
									装修负责人：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.renovate_owner_name}}
									</text>
								</view>
							</view>


							<view style="margin-top: 15px;">
								<view style="color: #999">
									装修负责人电话：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.renovate_owner_tel}}
									</text>
								</view>
							</view>

						</view>
					</view>
				</view>


				<view>
					<view class=" u-m-t-24">
						<span style="font-size: 15px;font-weight: 900;">财务信息：</span>
					</view>

					<view style="margin: 0 0rpx 0 30rpx;">


						<view style="margin-top: 5px;">
							<view style="color: #999">
								申请时间：
								<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
									{{userObj.begin_time}}
								</text>
							</view>
						</view>

						<view style="margin-top: 15px;">
							<view style="color: #999">
								支付方式：
								<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
									{{userObj.renovate_collect_way == 1 ? '现金' : userObj.renovate_collect_way ==2 ?
									'银行卡对私账户' : userObj.renovate_collect_way == 3 ? '银行卡对私账户' 
									: userObj.renovate_collect_way == 4 ? '支票' 
									: userObj.renovate_collect_way == 5 ? '扫码支付'
                   : userObj.renovate_collect_way==7? "业主端支付": '暂无'}}

								</text>
							</view>
						</view>

						<view style="margin-top: 15px;"
							v-if="userObj.renovate_collect_way==2 || userObj.renovate_collect_way==3 || userObj.renovate_collect_way==4 ">
							<view style="color: #999">
								<view class="u-font-26 u-margin-bottom-22">
									<span style="font-weight: 700;color: blue;"
										@click="imageBig(userObj.renovate_personal_pay_proof)">查看支付凭证</span>
								</view>
							</view>
						</view>
					</view>
				</view>

				<view>
					<view class=" u-m-t-24">
						<span style="font-size: 15px;font-weight: 900;">装修合同：</span>
						<span style="color: blue;font-size: 15px;font-weight: 900;"
							@click="imageBig(userObj.renovate_contract_image)">点击查看pdf装修合同</span>
					</view>

				</view>

				<view>
					<view class=" u-m-t-24">
						<span style="font-size: 15px;font-weight: 900;">装修改造区域：</span>
					</view>
					<view style="margin: 0 30rpx 0 30rpx;">

						<view class="u-flex u-row-between u-m-t-24">
							<view class="u-font-26 u-margin-bottom-22">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_construct_image)">装修施工图</span>
							</view>
							<view class="u-font-26 u-margin-bottom-22">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_result_image)">装修效果图</span>
							</view>
						</view>
					</view>
				</view>


				<view v-if="userObj.sf_state==1 || userObj.renovate_state==6 
				||userObj.renovate_state== 13  ||userObj.renovate_state== 16
				||userObj.renovate_state==17  ||userObj.renovate_state==7 ||userObj.renovate_state== 4">
					<view class=" u-m-t-24">
						<span style="font-size: 15px;font-weight: 900;">装修上传图片</span>
					</view>
					<view style="margin: 0 30rpx 0 30rpx;">

						<view class="u-flex u-row-between u-m-t-24">
							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_images">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_images)">装修竣工图纸</span>
							</view>
							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_waterway_images">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_waterway_images)">水路竣工图纸</span>
							</view>

							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_circuit_images">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_circuit_images)">电路竣工图纸</span>
							</view>
						</view>
					</view>


					<view style="margin: 0 30rpx 0 30rpx;">
						<view class="u-flex u-row-between u-m-t-24">

							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_central_images">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_central_images)">空调竣工图纸</span>
							</view>
							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_fuel_images">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_fuel_images)">燃气竣工图纸</span>
							</view>

							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_heating_images">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_heating_images)">暖气竣工图纸</span>
							</view>

						</view>
					</view>




					<view style="margin: 0 30rpx 0 30rpx;">
						<view class="u-flex u-row-between u-m-t-24">
							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_prevent_images">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_prevent_images)">消费竣工图纸</span>
							</view>
							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_material_images">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_material_images)">防火竣工图纸</span>
							</view>

							<view class="u-font-26 u-margin-bottom-22" v-if="userObj.renovate_completed_waterproof_imagese">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_waterproof_imagese)">防水竣工图纸</span>
							</view>
						</view>
					</view>


					<view style="margin: 0 30rpx 0 30rpx;" v-if="userObj.renovate_completed_fire_check_images">
						<view class="u-flex u-row-between u-m-t-24">
							<view class="u-font-26 u-margin-bottom-22">
								<span style="font-weight: 700;color: blue;"
									@click="imageBig(userObj.renovate_completed_fire_check_images)">消防验收报告</span>
							</view>
						</view>
					</view>


				</view>

				<view v-if="userObj.renovate_state==7||userObj.renovate_state==13">
					<view class=" u-m-t-24">
						<span style="font-size: 15px;font-weight: 900;">装修退款信息</span>
					</view>
					<view style="margin: 0 30rpx 0 30rpx;">

						<view class="u-flex u-row-between u-m-t-24">

							<view style="color: #999">
								违约金：
								<text style="font-weight: 700;color: #000;">
									<span style="color: #333;">
										{{userObj.renovate_penal_sum}}</span>
									元
								</text>
							</view>
							<view style="color: #999">
								装修费管理：
								<text style="font-weight: 700;color: #000;">
									<span style="color: #333;">
										{{userObj.renovate_manage}}</span>
									元
								</text>
							</view>
						</view>

						<view class="u-flex u-row-between u-m-t-24">
							<view style="color: #999">
								装修垃圾清运费：
								<text style="font-weight: 700;color: #000;">
									<span style="color: #333;">
										{{userObj.renovate_garbage_clear}}</span>
									元
								</text>
							</view>

							<view style="color: #999">
								其他费用：
								<text style="font-weight: 700;color: #000;">

									<span style="color: #333;">
										{{userObj.renovate_other}}</span>
									元
								</text>
							</view>
						</view>

						<view class="u-flex u-row-between u-m-t-24">
							<view style="color: #999">
								共计：
								<text style="font-weight: 700;color: #000;">
									<span style="color: #333;">
										{{userObj.renovate_out_refund}}</span>
									元
								</text>
							</view>

							<view style="color: #999">
								应退费用：
								<text style="font-weight: 700;color: #000;font-size: 18px;">
									<span style="color: red;">
										{{userObj.renovate_refund_money}}</span>
									元
								</text>
							</view>
						</view>
						<view style="color: #999999;margin-top: 15px;">扣除费用计入财务收入-违约金！</view>
					</view>
				</view>

				<view v-if="userObj.renovate_state==7||userObj.renovate_state==13">
					<view class=" u-m-t-48">
						<span style="font-size: 15px;font-weight: 900;">退款账号信息</span>
					</view>
					<view style="margin: 0 30rpx 0 30rpx;">

						<view v-if="userObj.renovate_refund_money>0">
							<view>
								<view style="color: #999" v-if="userObj.tkr">
									退款人：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.tkr}}</text>
								</view>
							</view>

							<view class="u-flex u-row-between">

								<view style="color: #999">
									退款方式：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.renovate_refund_way == 1 ? '微信' : userObj.renovate_refund_way == 2 ? '支付宝' : '转账'}}
									</text>
								</view>

								<view style="margin-top: 15px;">
									<view class="u-flex u-row-between ">
										<view class="u-font-26 u-margin-bottom-22">
											<span style="font-weight: 700;color: blue;" @click="imageBig(userObj.refund_way)">查看微信二维码</span>
										</view>
									</view>
								</view>
							</view>
							<view style="margin-top: 15px;" v-if="userObj.last_time">
								<view style="color: #999">
									退款时间：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.last_time}}
									</text>
								</view>
							</view>

							<view style="margin-top: 15px;" v-if="userObj.renovate_refund_way == 3">
								<view style="color: #999">
									支付宝：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.refund_way}}
									</text>
								</view>
							</view>
							<view style="margin-top: 15px;" v-if="userObj.renovate_refund_way == 3">
								<view style="color: #999">
									银行卡：
									<text style="font-weight: 700;color: #000;margin-left: 20rpx;">
										{{userObj.refund_way}}
									</text>
								</view>
							</view>
						</view>
					</view>
				</view>

				<view>
					<view class=" u-m-t-24" v-if="userObj.spInfo!=null ">
						<span style="font-size: 15px;font-weight: 900;">财务审批流程</span>
					</view>

					<view class="detal_img" v-for="(item,index) in userObj.spInfo">
						<view style="display: flex; margin-top:-15px">
							<image class="detal_on_in" @click="imageBig(item.sqr_image)" :src="item.sqr_image" mode="">
							</image>
							<view class="detal_img_on">
								<view class="detal_img_onFa">
									<view style="color: #578EF0;">审批人：
										<span style="color: #000;">{{item.shang_employee_name}}</span>
									</view>

								</view>
								<view class="detal_img_onFa">
									<view style="display: flex;">

										<view style="color: gray;font-size: 12px; width:209px">
											{{item.shang_org_name}}
											{{item.shang_project_name}}
											{{item.shang_dept_name}}
											{{item.shang_post_name}}
										</view>

										<view class="border_box" v-if='item.approvalStatus' :style="
												item.approvalStatus == 1 ? 'height:28px;width:52px; color:orange;border: 2rpx solid orange;' :
												item.approvalStatus == 2 ? 'height:28px;color:green; width:52px; border: 2rpx solid green;' :
											item.approvalStatus == 3 ? 'height:28px;color:grey; width:52px; border: 2rpx solid grey;' :
											''" style=' width:52px; border: 1px solid #007aff; padding: 2px 5px;font-size: 12px; border-radius: 5px;color: #007aff; margin-right: 5px;'>
											{{item.approvalStatus == 1 ? '未审批' :
										item.approvalStatus ==2 ? '已审批'
										 :item.approvalStatus ==3 ? '已通过' :
												''}}
										</view>
									</view>
								</view>
								<view class="cont-text" v-if="item.approval_opinion">{{item.approval_opinion}}</view>
							</view>
						</view>
					</view>
				</view>


				<view v-if="userObj.renovate_state==11 || userObj.renovate_state==12 || userObj.renovate_state==2">
					<view class=" u-m-t-24" v-if="userObj.checkList.length!=0">
						<span style="font-size: 15px;font-weight: 900;">审批记录：</span>
					</view>
					<view class="detal_img" v-for="(item,index) in userObj.checkList" v-if="item.check_status==2">
						<view style="display: flex; margin-top:-15px">
							<image class="detal_on_in" :src="item.avatar " mode=""></image>
							<view class="detal_img_on">
								<view class="detal_img_onFa">
									<view style="color: #578EF0;">
										<span style="color: #000;font-weight: 600;">{{item.check_name}}</span>
									</view>
									<view class="dedal_img_Date">
										{{item.begin_times}}
									</view>
								</view>
								<view class="detal_img_onFa">
									<view style="display: flex;">
										<view style="color: gray;font-size: 12px; width:209px">
											{{item.departmentName}}-{{item.postName}}
										</view>

										<view v-if="item.check_text != null">

											<view style="    margin-left: 45px;">
												<span class="border_box2" :style="item.check_status=='1'?'color: #767070;border: 2rpx solid #767070;'
													:item.check_status=='2'?'color: red;border: 2rpx solid red;':
													''">
													{{item.check_status==1?"同意":"拒绝"}}
												</span>
											</view>
										</view>

									</view>

								</view>

								<view style="color: #578EF0;margin-left: -65px;">审批说明：
									<span style="color: #000;font-weight: 600px;">{{item.check_text}}</span>
								</view>
								<view style='border:0.5px solid #eee;margin-top: 5px;margin-left: -65px;'></view>
							</view>
						</view>
					</view>
				</view>
			</view>

			<view v-if="timeStatus==false" style="color:#999;margin-top: 18px" class="pr-4 pl-4">
				说明：重新提交装修需要再半年之内进行操作，超过此期限需要重新发起装修申请。
			</view>

			<view style="display: flex;justify-content: space-between;padding: 32px 0;"
				v-if="userObj.renovate_state ==11 || userObj.renovate_state ==3 || userObj.renovate_state ==20">
				<button v-if="userObj.renovate_state ==3" type="default"
					style="width: 40%;border-radius: 78px;color: red;border: 1px solid red;"
					@click="navTo('/homePage1/renovation/refund',item)">退款</button>
			</view>

			<view style="display: flex;justify-content: space-between;padding: 20px 0;margin-bottom: 10px;"
				v-if="userObj.renovate_state ==9">
				<button class="button1" style="margin:-1px 22px; position: relative; left:10px" @click="JumpOpen()"><span
						style="font-size: 16px;">下载施工许可证</span></button>
				<button class="button_in" type="primary" v-if="userObj.currentRenovationStatus!=1"
					style="background: linear-gradient(180deg, #76D904 0%, #417505 100%);" @click="confirmRenovation(1)">
					<span style="font-size: 16px;">开始装修</span></button>

				<button class="button_in" type="primary" v-if="userObj.currentRenovationStatus==1"
					style="background: linear-gradient(180deg, rgb(153, 153, 153) 0%, #C0C0C0 100%);"
					@click="renovationNotStarted()">
					<span style="font-size: 16px;">装修未开始</span></button>
			</view>

			<view style="display: flex;justify-content: space-between;padding: 32px 0;"
				v-if="userObj.renovate_state ==2 ">
				<button class="button3" @click="clickPermit()">
					许可证
				</button>
				<button v-if="userObj.currentRenovationStatus!=1" type="default" class="button3"
					@click="navTo('/privateMsg/renovation/uploadRenovation',item)">
					{{userObj.checkList.length==0?"上传装修资料":"重新上传资料"}}
				</button>
			</view>

			<view style="display: flex;justify-content: space-between;padding: 32px 0;" v-if="userObj.renovate_state ==1 ">
				<button type="default" class="button6" @click="renovationNotStarted2()">
					取消申请
				</button>
			</view>

			<view style="display: flex;justify-content: space-between;padding: 32px 0;" v-if="userObj.renovate_state ==12 ">
				<button class="button1" style="margin:-1px 22px; position: relative; left:10px" @click="JumpOpen()"><span
						style="font-size: 16px;">下载施工许可证</span></button>
				<button class="button_in" type="primary" v-if="userObj.currentRenovationStatus!=1"
					style="background: linear-gradient(180deg, #76D904 0%, #417505 100%);" @click="confirmRenovation(2)">
					<span style="font-size: 16px;">装修完成申请验收</span></button>
			</view>

			<view class="buton" v-if="userObj.renovate_state ==13 && userObj.approval_status==1">
				<view class="foot_item">
					<button class="button1" style="margin:-1px 22px; position: relative; left:10px"
						@click="navTo('/homePage1/renovation/refuse')">拒绝</button>
					<button class="button_in" type="primary"
						style="background: linear-gradient(180deg, #76D904 0%, #417505 100%);"
						@click="navTo('/homePage1/renovation/agree')">同意</button>
				</view>
			</view>
		</view>


		<view class="modal" v-if="bonoBadiri" @click="bonoBadiri = false">
			<view class="modal-cont">
				<view class="imageBack"></view>
				<view>
					<view style="position: absolute;top: 21px;left: 130px;font-size: 18px; font-weight: 600;">
						<view style="margin-top: -12px;">装修工人</view>
					</view>
				</view>

				<view v-for="(item, index) in examinData" :key="index" :name='index'>
					<view :style="index === 0 ? 'margin-top: 35px;' : 'margin-top: 10px; '">

						<view style="display: flex; padding-bottom: 15px;">
							<view style="width: 33%;">
								<image @click="imageBig(item.worker_image)" :src="item.worker_image"
									style="width: 70px;     height: 70px;  margin-top: 12px; margin-left: 24px;" alt="">

								</image>
							</view>
							<view style="width: 100%; margin-left: 10px;">
								<view style="margin-top: 10px;">
									姓名: <text style="font-weight: 700;">{{item.worker_name}}</text>
								</view>
								<view style="margin-top: 10px;">
									电话: <text style="font-weight: 700;">{{item.worker_tel}}</text>
								</view>
								<view style="margin-top: 10px;">
									身份证: <text style="font-weight: 700; ">{{item.worker_card}}</text>
								</view>
							</view>
						</view>
						<view style="border-bottom: 1px solid #C0C0C0;"></view>
					</view>
				</view>
			</view>
		</view>


		<!-- 检查记录 -->
		<view class="nav_item" v-if="isActive==1">
			<view style="margin-top: 10px;">
				<view class="header-center" v-for="(item,index) in recordData" :key="index"
					@click="navTo2('/privateMsg/renovation/renovationInfo',item)" v-if="recordData.length>0">
					<view class="polling" style="display: flex;">
						<image style="width: 36rpx;height: 34rpx;margin-top: 3px;">
						</image>
						<view style="margin-left: 10rpx;font-family: 550;font-size: 32rpx;font-weight: 600;">
							{{item.house_type==1 || item.house_type==null?item.renovate_district +
                '-' +
                item.renovate_floor +
                '-' +
                item.renovate_unit +
                '-' +
                item.renovate_house_number
                :item.house_type==2?item.pubilc_name:item.house_type==3?item.roomInfo:""}}
						</view>
					</view>
					<view style="float: right;align-items: center;margin-top: -40rpx;">
						<view class="notice-typePu" v-if="item.check_type == 1">
							巡检
						</view>
						<view class="notice-type" v-if="item.check_type == 2">
							验收
						</view>
					</view>

					<view>
						<view class="polling_item">
							<view class="polling-data">检查岗位：</view>
							<view>
								{{item.renovate_dept_name}} {{item.renovate_post_name}} {{item.userName}}
							</view>

						</view>
					</view>
					<view style="display: flex;justify-content: space-between;margin-top: 10px;">
						<view class="list-content">
							<view><span class="polling-data">合格：</span><span>{{item.qualified}}</span></view>

						</view>
						<view class="list-content">
							<view> <span class="polling-data">基本合格：</span> <span>{{item.basically}}</span></view>

						</view>
						<view class="list-content">
							<view> <span class="polling-data">不合格：</span> <span>{{item.conforming}}</span></view>
						</view>
					</view>
					<view>
						<view class="polling_item">
							<view class="polling-data">检查时间：</view>
							{{item.begin_time}}
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				type: 1,
				index: 0,
				array: ['分类', '分类二'],
				buttonClick: 0,
				buttonDay: 0,
				isActive: 0,
				inday: 0,
				navList: [{
						index: 1,
						title: "详情"
					},
					{
						index: 2,
						title: "检查记录"
					},


				],
				examinData: [],
				recordData: [],
				id: null,
				userObj: {
					renovate_personal_pay_proof: null
				},

				information: {},

				bonoBadiri: false,

				timeStatus: true,


			}
		},
		onLoad(options) {
			const item = JSON.parse(decodeURIComponent(options.item));
			this.userObj = item

			this.resubmit(this.userObj)


		},
		onShow() {

			// this.getinspect()
		},
		methods: {
			clickPermit(){
				uni.navigateTo({//跳转页面
					url:"/privateMsg/renovation/permit?id="+this.userObj.id
				})
			},
			editBtn() {
				let res = this.$request.api.updateRenovate({
					id: this.userObj.id,
					renovate_state: 20,
				}).then(res => {
					this.renovation();
				})
			},
			renovationNotStarted2() {
				uni.showModal({
					title: '提示',
					content: '是否取消装修申请。\n申请取消后，装修押金将在一个工作日后原路退还。',
					confirmText: '确认装修申请',
					cancelText: '取消装修申请',
					success: (res) => { // Use arrow function to preserve the scope of "this"
						if (res.confirm) {
							console.log('用户点击了确认按钮');
							this.editBtn();
						} else if (res.cancel) {
							console.log('用户点击了取消按钮');
							// Clicking on the cancel button logic
						}
					}
				});
			},


			// 判断当前时间是否超过半年
			resubmit(item) {
				console.log(item)
				let yy = new Date().getFullYear();
				let mm = new Date().getMonth() + 1;
				let dd = new Date().getDate();
				mm = mm < 10 ? "0" + mm : mm; // 补0操作
				dd = dd < 10 ? "0" + dd : dd; // 补0操作

				let currentDate = new Date(yy, mm - 1, dd); // 当前日期
				currentDate.setMonth(currentDate.getMonth() + 6); // 加半年时间

				let newYear = currentDate.getFullYear();
				let newMonth = currentDate.getMonth() + 1;
				let newDay = currentDate.getDate();
				newMonth = newMonth < 10 ? "0" + newMonth : newMonth; // 补0操作
				newDay = newDay < 10 ? "0" + newDay : newDay; // 补0操作

				let newDate = newYear + "-" + newMonth + "-" + newDay; // 加半年后的日期


				if (newDate >= item.update_time) {
					this.timeStatus = true
				} else {
					this.timeStatus = false
				}

				console.log(this.timeStatus)
			},






			JumpOpen() {
				window.open("http://192.168.101.162:8080/admin#/decoration/renovationLicenses?id=171")
			},

			renovationNotStarted() {
				uni.showModal({
					title: '提示',
					content: '如未到装修开始时间不能开始装修，如需提前装修请到物业管理中心修期。',
					success: (res) => { // Use arrow function to preserve the scope of "this"
						if (res.confirm) {
							console.log('用户点击了确认按钮');
						} else if (res.cancel) {
							console.log('用户点击了取消按钮');
							// Clicking on the cancel button logic
						}
					}
				});
			},


			confirmRenovation(type) {
				uni.showModal({
					title: type === 1 ? '确认装修申请！' : '装修完毕验收申请',
					content: type === 1 ? '是否开始装修！' : '是否确认装修已完毕，申请进行装修验收',
					success: (res) => { // Use arrow function to preserve the scope of "this"
						if (res.confirm) {
							this.updateRenovation();

							// Clicking on the confirm button logic
						} else if (res.cancel) {
							console.log('用户点击了取消按钮');
							// Clicking on the cancel button logic
						}
					}
				});
			},



			async updateRenovation() {
				let res = await this.$request.api.updateRenovation(this.userObj, {});
				this.renovation();
			},


			async renovation() {
				let res = await this.$request.api.renovationList({
					pageIndex: 1,
					room_id: this.userObj.room_id,
					ownerApp: 1,
				}).then(res => {
					console.log(res)

					this.userObj = res.data.data.datalist[0]

				})
			},

			async application() {

				let res = await this.$request.api.renovationList({
					pageIndex: 1,
					room_id: this.userObj.room_id,
					ownerApp: 1,
				}).then(res => {
					console.log(res)

					this.userObj = res.data.data.datalist[0]

				})

			},


			navTo2(url, val) {
				uni.navigateTo({
					url: url + "?user_id=" + val.user_id + "&room_id=" + val.room_id + "&project_id=" + val
						.project_id + "&renovate_id=" + this.userObj.id + "&check_type=" + val.check_type
				});
			},




			//获取施工人员
			async getPeoperList() {
				let res = this.$request.api.getPeoper({

					pid: this.userObj.id,
				}).then(res => {
					let penperList = res.data.data.datalist
					for (let i = 0; i < penperList.length; i++) {
						let item = penperList[i]
						if (item.worker_name && item.worker_tel && item.worker_card) {
							this.examinData = penperList
							this.bonoBadiri = true
						}
					}
				})
			},


			async getRenovateList() {
				let res = this.$request.api.renovateList({
					renovate_id: this.userObj.id,
				}).then(res => {
					this.recordData = res.data.data.datalist

				})
			},


			async uploadProfileStatus() {
				let res = this.$request.api.uploadRenovation({
					renovate_id: this.userObj.id,
				}).then(res => {
					this.recordData = res.data.data.datalist

				})
			},






			checked(index) {
				this.isActive = index
				if (this.isActive === 1) {
					this.getRenovateList();
				}

			},

			navTo(url) {
				let items = encodeURIComponent(JSON.stringify(this.userObj))
				uni.navigateTo({
					url: url + '?item=' + items
				});
			},
			imageBig(url) {
				uni.previewImage({
					urls: [url], //需要预览的图片http链接列表，多张的时候，url直接写在后面就行了
				})
			},
		}
	}
</script>


<style lang="scss">
	.repair-wrap {
		width: 100%;
		min-height: 100vh;
		height: auto;
		background: #f4f4f4;
		overflow: hidden;

		.repair-box {
			background: #fff;

			.repair-titel {
				height: 44rpx;
				line-height: 44rpx;

				.repair-titel-l {
					float: left;
				}

				.repair-titel-r {
					float: right;
					color: #999;
				}
			}

			.repair-6 {
				color: #666;
			}
		}
	}

	.tab_nav {
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.tab_nav .navTitle {
		height: 90rpx;
		line-height: 90rpx;
		width: 100%;
		text-align: center;
		font-size: 32rpx;
		font-family: Alibaba PuHuiTi;
		color: #333;
	}

	.active {
		position: relative;
		color: #427705;
	}

	.active::after {
		content: "";
		position: absolute;
		width: 100rpx;
		height: 4rpx;
		background-color: #427705;
		left: 0px;
		right: 0px;
		bottom: 0px;
		margin: auto;
	}

	.foot_item {
		margin-top: 40rpx;
		height: 120rpx;
	}

	.button1 {
		width: 40%;
		// height: 30%;
		line-height: 36px;
		float: left;
		margin-left: 37px;
		color: black;
		border: 1px solid #578EF0;
		background-color: #ffffff;
		border-top-left-radius: 40rpx;
		border-bottom-left-radius: 40rpx;
		margin: -1px 22px;
		position: relative;
		left: 10px
	}

	.button_in {
		width: 40%;
		line-height: 36px;
		float: right;
		margin-right: 34px;
		border-top-right-radius: 40rpx;
		border-bottom-right-radius: 40rpx;
	}

	.button:hover {
		border: 1px solid #F9A832;
		color: #FFFFFF;
		background-color: #F9A832;
	}

	.button_renovation {
		width: 31%;
		font-size: 10px;
		border-radius: 11px;
		border: 1px solid #2986FF;
		background-color: rgb(255, 255, 255);
		margin-right: 249px;
		color: #2986FF;
		margin-top: 20px;
	}

	.button_renovation1 {
		width: 31%;
		font-size: 10px;
		border-radius: 5px;
		border: 1px solid #2986FF;
		background-color: rgb(255, 255, 255);
		line-height: 21px;
		color: #2986FF;
		margin-left: 199px;

	}

	.title-right {
		display: flex;
		// width: 252rpx;
		height: 60rpx;
		border-radius: 4rpx;
		border: 2rpx solid #578EF0;
		background: #578EF0;
		width: 138px;
		// box-sizing: border-box;
	}

	.you {
		line-height: 60rpx;
		padding: 0 40rpx;
		// width: 50%;
		text-align: center;
		color: #FFFFFF;
		background: #578EF0;
	}

	.wu {
		line-height: 60rpx;
		padding: 0 40rpx;
		// width: 50%;
		text-align: center;
		color: #578EF0;
		background: #FFFFFF;
	}

	.notice-typeOrgin {
		background: linear-gradient(90deg, #FFAA33 0%, #FFBB66 100%);
		border-radius: 22rpx 0;
		text-align: center;
		color: #fff;
		padding: 10rpx 14rpx
	}

	.modal {
		position: fixed;
		top: 0%;
		left: 0%;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.8);
		z-index: 10;

	}

	.modal-cont {
		width: 80%;
		// min-height: 420rpx;
		background: #ffffff;
		box-shadow: 0rpx 6rpx 12rpx 0rpx rgba(0, 0, 0, 0.12);
		border-radius: 24rpx;
		display: flex;
		flex-direction: column;
		// align-items: center;
		position: relative;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		padding-bottom: 24px;
	}

	.modal-bottom {
		width: 100%;
		height: 84rpx;
		// border-top: 1rpx solid #e6e9ed;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 16px;
		// margin-top: 50rpx;
	}

	.meeting-btn {
		width: 350rpx;
		height: 88rpx;
		line-height: 88rpx;
		background: #FFFFFF;
		border-radius: 22px;
		border: 1px solid #427705;
		text-align: center;
		color: #427705;
		margin: 0 auto;
	}

	.foot_item {
		margin-top: 40rpx;
		height: 120rpx;
	}

	.header-center {
		width: 95%;
		margin: 8rpx auto;
		background-color: #FFFFFF;
		border-radius: 10px;
		padding: 20px 20px;
	}

	.polling_item {
		display: flex;
		margin-top: 10px;
	}

	.polling-data {
		color: #AAAAAA;
	}

	.notice-typePu {
		width: 110rpx;
		height: 44rpx;
		background: linear-gradient(90deg, #ebb15ddb 0%, #f9a832 100%);
		border-radius: 16rpx 0;
		text-align: center;
		color: #fff;
		font-size: 24rpx;
		line-height: 44rpx;
	}

	.notice-type {
		width: 110rpx;
		height: 44rpx;
		background: linear-gradient(90deg, #007aff 0%, #007aff 100%);
		border-radius: 16rpx 0;
		text-align: center;
		color: #fff;
		font-size: 24rpx;
		line-height: 44rpx;

	}

	.button3 {
		height: 40px;
		line-height: 40px;
		width: 40%;
		border-radius: 33px;
		color: #FFFFFF;
		background: linear-gradient(180deg, #76D904 0%, #417505 100%);
	}

	.button4 {
		height: 40px;
		line-height: 40px;
		width: 80%;
		border-radius: 33px;
		color: #FFFFFF;
		background: linear-gradient(180deg, #AAAAAA 0%, #999 100%);
	}

	.button5 {
		height: 40px;
		line-height: 40px;
		width: 80%;
		border-radius: 33px;
		color: #FFFFFF;
		background: linear-gradient(180deg, #999 0%, #999 100%);
	}

	.button6 {
		height: 40px;
		line-height: 40px;
		width: 80%;
		border-radius: 33px;
		color: #FFFFFF;
		background: linear-gradient(180deg, #e5e5e5 0%, #666 100%);
	}


	.border_box {
		width: 55px;
		border: 1px solid #007aff;
		padding: 1px 5px;
		border-radius: 5px;
		color: #007aff;
	}

	.border_box2 {
		width: 55px;
		border: 1px solid red;
		padding: 1px 5px;
		border-radius: 5px;
		color: red;
	}



	.u-padding-80,
	.u-p-80 {
		padding-top: 40px !important;
		padding-right: 44px !important;
		padding-bottom: 13px !important;
		padding-left: 44px !important;
	}

	.details_add {
		margin-top: 8rpx;
		background-color: #FFFFFF;
	}

	.big-button2 {
		color: rgb(118, 112, 112);
		border: 1px solid rgb(118, 112, 112);
	}

	.repair-cont {
		width: 96%;
		margin: 0 auto;
		padding: 28rpx 20rpx 10px 20rpx;
		background: #ffffff;
		border-radius: 20rpx;

		// box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.15);
		.detail-li {
			display: flex;
			margin: 0 0 14rpx 0;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;

			.detail-name {

				line-height: 44rpx;
				font-weight: 500;
				color: #999;

				// font-weight: bold;
			}

		}
	}

	.detal_img {
		width: 100%;
		display: flex;
		margin-top: 59rpx;
		justify-content: space-between;

		.detal_on_in {
			width: 80rpx;
			height: 80rpx;
			border-radius: 40rpx;
			margin-right: 30rpx;
		}

		.detal_img_on {
			.detal_img_onFa {
				font-size: 15px;
				letter-spacing: 3rpx;
				color: #333333;
				line-height: 45rpx;
				display: flex;
				width: 72vw;
				justify-content: space-between;

				.dedal_img_Date {
					// width: 40%;
					color: #999999;
					font-size: 24rpx;
					text-align: right;
				}
			}

			.cont-text {
				width: 72vw;
				font-size: 26rpx;
				font-weight: 400;
				color: #999999;
				line-height: 37rpx;
				margin-top: -3px;
			}

			.image-all {

				.image-detail {
					width: 80rpx;
					height: 80rpx;
					// background: #D8D8D8;
					border-radius: 8rpx;
					margin-right: 20rpx;
				}
			}
		}



		.detal_img_onGg {
			color: #999999;
			font-size: 26rpx;
			line-height: 37rpx;
			margin-top: 6rpx;
		}


	}
</style>